Add a rule to prevent references to browser/ code in toolkit/ CSS code
Categories
(Developer Infrastructure :: Lint and Formatting, task)
Tracking
(Not tracked)
People
(Reporter: hjones, Unassigned)
References
(Blocks 1 open bug)
Details
In the Firefox codebase browser
code can depend on toolkit
code, but toolkit
code should never depend on browser
code since toolkit
code can be used in other applications/contexts where browser
code is not necessarily available. We have a no-browser-refs-in-toolkit ESLint rule that flags attempted usage of browser
code in toolkit
in our JS code. We should add an analogous rule to stylelint-plugin-mozilla
, especially since this has recently slipped through the cracks on a review and caused a backout in bug 1942373.
This seems to have been done (partially?) in bug 1698112.
Reporter | ||
Comment 2•3 months ago
|
||
Hey Itiel - that's a good find thanks for the heads up. That test is useful, but likely won't get run by folks for a lot of style changes which could result in backouts. I think a Stylelint rule might be nicer as it'll flag the issue at the time of commit/on Phabricator during code review.
Description
•